package cn.itcast.day1;

public abstract class WeekDay2
{
	private WeekDay2()
	{
	}

	public final static WeekDay2 SUN = new WeekDay2()
	{
		@Override
		public WeekDay2 nextDay()
		{

			return MON;
		}

	};
	public final static WeekDay2 MON = new WeekDay2()
	{
		@Override
		public WeekDay2 nextDay()
		{

			return SUN;
		}

	};

	public abstract WeekDay2 nextDay();

	public String toString()
	{
		return this == SUN ? "SUN" : "MON";
	}
}
